package tools.NW3D;

import java.util.ArrayList;
import java.util.Collection;

public class Cell {

	private Cell prevCell;
	private int score;
	private int row;
	private int col;
	private String kmer;
	private ArrayList<String> alternatives;
	
	
	protected Cell(){
		this(0,0);
	}
	
	public Cell(int row, int col) {
		super();
		this.row = row;
		this.col = col;
		alternatives= new ArrayList<String>();
	}
	
	
	public Cell getPrevCell() {
		return prevCell;
	}
	public void setPrevCell(Cell prevCell) {
		this.prevCell = prevCell;
	}
	public int getScore() {
		return score;
	}
	public void setScore(int score) {
		this.score = score;
	}
	public int getRow() {
		return row;
	}
	public int getCol() {
		return col;
	}
	public String getKmer(){
		return kmer;
	}
	
	public void setKmer(String kmer){
		this.kmer=kmer;
	}
	
	public final ArrayList<String> getAlternatives(){
		return alternatives;
	}
	
	public void clearAlternatives(){
		alternatives.clear();
	}

	public void setAlternatives(String alt){
		alternatives.clear();
		alternatives.add(alt);
	}
	
	public void setAlternatives(Collection<String> alts){
		alternatives.clear();
		alternatives.addAll(alts);
	}
	
	public void addAlternative(String alt){
		alternatives.add(alt);
	}
	
	public void addAlternative(Collection<String> alts){
		alternatives.addAll(alts);
	}

	@Override
	public String toString() {
		return "Cell(" + row +", "+ col + "): score=" + score +", kmer: "+kmer+", prevCell="+ prevCell + "]";
	}
	
	
}
